package homework.test2;

public class TestStudentTool {

    public static void main(String[] args) {
        Student[] arr = new Student[5];//创建数组对象
        StudentsTool tool = new StudentsTool();//创建工具对象
        arr[0] = new Student("张三",19, 170);
        arr[1] = new Student("李四",18, 180);
        arr[2] = new Student("王五",17, 165);
        arr[3] = new Student("赵六",19, 175);
        arr[4] = new Student("孙七",18, 170);
        System.out.println("打印所有学员信息：");
        tool.listStudents(arr);
        System.out.println("获取所有学员成绩的最高分：");
        System.out.println(tool.getMaxScore(arr));
        System.out.println("获取所有学员成绩的最高分对应的学员：");
        System.out.println(tool.getMaxStudent(arr));
        System.out.println("获取所有学员成绩的平均分：");
        System.out.println(tool.getAverageScore(arr));
        System.out.println("获取所有不及格学员数量：");
        System.out.println(tool.getCount(arr));


    }
}
